package ua.kiev.tosik.price.modules.clients.gui.files;

import ua.kiev.tosik.price.modules.clients.conf.ModuleConfig;

import javax.swing.*;
import java.awt.*;

public class PricesFilesPanel implements IPricesTab {

	private JPanel panel;
	private PricesFilesTable table;
	private ModuleConfig config;

	public PricesFilesPanel() {
		config = ModuleConfig.getInstance();
		panel = new JPanel( new BorderLayout() );
		table = new PricesFilesTable();
		panel.add(table.getTable(), BorderLayout.CENTER);
	}

	@Override
	public void destroy() {
		
	}

	@Override
	public JPanel getPanel() {
		return panel;
	}

	@Override
	public String getTitle() {
		return config.get("clients.files.table.tab.title");
	}

	@Override
	public ImageIcon getImageIcon() {
		return new ImageIcon(config.get("clients.files.table.tab.icon"));
	}

	public PricesFilesTable getTable() {
		return table;
	}

}
